import { getCategoryData } from '@akinon/next/data/server'; import { withSegmentDefaults } from '@akinon/next/hocs/server'; import { ResolvedPageProps } from '@akinon/next/types'; import CategoryLayout from '@theme/views/category/layout'; import { buildListingPageContext } from '@akinon/pz-theme/src/chrome/page-context'; import { notFound } from 'next/navigation'; async function Page({ params, searchParams }: ResolvedPageProps<{ pk: number }>) { try { const { data, breadcrumbData } = await getCategoryData({ pk: params.pk, searchParams }); return ( <> ); } catch (error: unknown) { if ((error as Error & { status?: number })?.status === 404) { notFound(); } throw error; } } export default withSegmentDefaults(Page, { segmentType: 'page' });